<!-- 配偶信息 -->
<div class="detaiTab">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tbody>
					<tr>
                        <td width="15%" align="right" class="bg">配偶姓名： </td>
                        <td width="35%">${loanMaterUser.userSurName}${loanMaterUser.userName} </td>
                        <td width="15%" align="right" class="bg">证件类型：</td>
                        <td><@select dataSouceType="OTOIDCARDTYPE" class="tabInp"
							value="${loanMaterUser.documentType}" renderonly="true"/></td>
                    </tr>
                    <tr>
						<td align="right" class="bg" width="18%">配偶姓拼音:</td>
						<td>${loanMaterUser.surnamePinyin}</td>
						<td align="right" class="bg" width="18%">配偶名拼音:</td>
						<td>${loanMaterUser.namePinyin}</td>
					</tr>
                     <tr>
                        <td width="15%" align="right" class="bg">证件号码:</td>
                        <td colspan="3">
                        <input id="document_no3" type="hidden" value="${loanMaterUser.documentNo}">
                        <#if type=="detail" || approvalStatus=='UNDO'>
                        	${loanMaterUser.documentNo}
						<#else>
							${loanMaterUser_sensitive.documentNo}
					<@permission permissionName="loanUserLookInfo">
					<a class="action-ajax-btn fr edit btn_blue" href="/loanrest/show_spouse?id=${loanMaterUser.id}">查看</a>
					</@permission>
					</#if>
                        </td>
                    </tr>
                    
                     <tr>
                       <td width="15%" align="right" class="bg">性别 :</td>
                       <td >${show_sex}</td>
                       <td width="15%" align="right" class="bg">发证机构:</td>
                       <td>${materBasic.issuingAuthority}</td>
                    </tr>
                    
                    <tr>
                        <td width="15%" align="right" class="bg">年龄:</td>
                        <td><span id="age3"></span>（岁）</td>
                        <td width="15%" align="right" class="bg">证件有效期:</td>
                        <td>
                        <@date name="licenseExpirationDate" disabled="disabled" class="bn" value="${materBasic.licenseExpirationDate}" />
                        </td>
                    </tr>
                    
                     <tr>
						<td width="15%" align="right" class="bg">联系电话 :</td>
                        <td> 
                        <#if type=="detail" || approvalStatus=='UNDO'>
                        	${loanMaterUser.userPhone}
						<#else>
							${loanMaterUser_sensitive.userPhone}
					<@permission permissionName="loanUserLookInfo">
					<a class="action-ajax-btn fr edit btn_blue" href="/loanrest/show_spouse?id=${loanMaterUser.id}">查看</a>
					</@permission>
					</#if>
                        </td>
                        <td width="15%" align="right" class="bg">学历:</td>
                        <td>
                        	<@select dataSouceFrom="CRM" dataSouceType="education" value="${materBasic.education}"  renderonly="true"/>
                        </td>
                    </tr>
                    
                    <tr>
                        <td width="15%" align="right" class="bg">微信号 :</td>
                        <td colspan="3">
                        <#if type=="detail" || approvalStatus=='UNDO'>
                        	${materBasic.wechat}
						<#else>
							${materBasic_sensitive.wechat}
					<@permission permissionName="loanUserLookInfo">
					<a class="action-ajax-btn fr edit btn_blue" href="/loanrest/show_spouse?id=${loanMaterUser.id}">查看</a>
					</@permission>
					</#if>
                        </td>
                    </tr>
                    <tr>
                        <tr>
							<td width="15%" align="right" class="bg">户籍地址 :</td>
							<td colspan="3">
							<#if type=="detail" || approvalStatus=='UNDO'>
							<span id = "pohjdz">
								<@select dataSouceType="province" value="${materBasic.accountProvince}" renderonly="true"/>&nbsp;&nbsp;
								<@select dataSouceType="city" value="${materBasic.accountCity}"  renderonly="true"/>&nbsp;&nbsp;
								<@select dataSouceType="COUNTY" value="${materBasic.accountAounty}"  renderonly="true"/>&nbsp;&nbsp;
	                    		${materBasic.permanentresidence}
	                    		</span>&nbsp;&nbsp;
	                    		<a href="javascript:void(0);" target="_blank" onclick="pohjdzmap(this);">地图中查看</a>
						<#else>
								<@select dataSouceType="province" value="${materBasic.accountProvince}" renderonly="true"/>&nbsp;&nbsp;
								<@select dataSouceType="city" value="${materBasic.accountCity}"  renderonly="true"/>&nbsp;&nbsp;
								******
					<@permission permissionName="loanUserLookInfo">
					<a class="action-ajax-btn fr edit btn_blue" href="/loanrest/show_spouse?id=${loanMaterUser.id}">查看</a>
					</@permission>
					</#if>
								
							</td>
						</tr>
                        
                    </tr>
                   <tr>
                        <td width="15%" align="right" class="bg">工作单位:</td>
                        <td colspan="3">
                        <#if type=="detail" || approvalStatus=='UNDO'>
                        ${materBasic.workUnit}
					<#else>
						${materBasic_sensitive.workUnit}
					<@permission permissionName="loanUserLookInfo">
					<a class="action-ajax-btn fr edit btn_blue" href="/loanrest/show_spouse?id=${loanMaterUser.id}">查看</a>
					</@permission>
					</#if></td>
                    </tr>
                    </tr>
				</tbody>
			</table>
		</div>
		
 <@js>
	 var document_no = $('#document_no3').val();
	 $('#age3').text(getAge(document_no));
	 //$('#sex3').text(getSex(document_no) == 'M'? '男':'女 ');
	 
	 //根据身份证信息获取年龄
	function getSex(UUserCard){
		//获取出生日期
		UUserCard.substring(6, 10) + "-" + UUserCard.substring(10, 12) + "-" + UUserCard.substring(12, 14);
		//获取性别
		if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) {
			//alert("男");
		  	return 'M';
		} else {
			//alert("女");
			return 'F';
		}
	}
	
	  function getAge(UUserCard){
		var myDate = new Date();
		var month = myDate.getMonth() + 1;
		var day = myDate.getDate();
		var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
		if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
			age++;
		}
		//alert(age);
		return age;
    }
    
    function pohjdzmap(obj){
		var location = $('#pohjdz').html().replace(/[\r\n &nbsp;]/g,'');
		obj.href='http://api.map.baidu.com/geocoder?address='+location+'&output=html&src=';
	}
	
</@js>
<@jsRender/>